-
Notifications
You must be signed in to change notification settings - Fork 88
makes xinetd restart action distro independent #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
this will also ensure restart will work on systems using systemd
|
+1 :-D |
|
Hmm, interesting. Will this work on systems not using systemd as well? Also, could you please rebase this against master? Thanks! |
|
Related to #8 |
|
This will work everywhere for sure, since we are sending a signal to the process directly to reload. The only issue I can see is the PATH variable (maybe we want to provide /usr/bin/pkill). |
Conflicts: manifests/init.pp
|
This will work regardless of the start script manager so I've rebased the changes but decided not to use the absolute path for pkill ; we should be safe to go by trusting the default PATH variable definition and also preserve some level of fexibility in sub-standard environments; if you think that is not the case, please comment |
|
Hi, Thank you for the bug report @giulivo. I faced the same issue I resolved with a similar pkill call: This sounds a bit less dangerous to me even if this mean we have to identify where the PID is stored. |
|
Do you think you can change this to the pkill @goneri posted? |
|
Thank you for taking care of this annoying issue. If you do pkill foo, pkill will search for every process name matching “foo” and send them a sigterm. You can reduce the risk with the --exact parameter. With it pkill will only look for process named just “foo”. But you still can get two different processes called “foo”. The use of the pid file is a safe you to identify the correct process. That's actually what the init scripts do in general. |
|
@goneri I wasn't asking about passing the path of the pid file, but about using the full path of the pkill executable. Is there a reasnon for using "/usr/bin/pkill" rather than "pkill" ? |
|
Oh sorry. Well since /usr/bin is probably in the $PATH everywhere, I'm not sure that necessary. It's just an habit. |
|
@apenney I rebased and noticed that this is now managed by defining a different restart command for each distro in manifests/params.pp Do you really want to replace that with a more generic pkill? |
|
I think this PR is actually no longer needed, since the params.pp parameterizes the restart command and hasrestart attribute. |
this will also ensure restart will work on systems using systemd